<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<SCRIPT language=JavaScript>
var message="";
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")
</SCRIPT>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
/* Hyperlink */
//a:link {	color: #000000;	text-decoration: none;}
//a:visited {	color: #000000; text-decoration: none;}
//a:hover {	color: #000000; text-decoration: none;}
//a:active {	color: #000000; text-decoration: none;}
.camposs {	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 9px;
	background-color: #999999;
	border: 1px solid #666666;
}
body,td,th {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	color: #FFFFFF;
	font-size: 9px;
}
body {
  scrollbar-arrow-color: #FF9900;
  scrollbar-3dlight-color: #FFFFFF;
  scrollbar-highlight-color: #000000;
  scrollbar-face-color: #FFFFFF;
  scrollbar-shadow-color: #000000;
  scrollbar-darkshadow-color: #FFFFFF;
  scrollbar-track-color: #cdcdcd;
	margin-left: 15px;
	margin-top: 15px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #2b2b2b;
}
-->
</style>
</html>
</head>
<?
include("db.php");
$sql = mssql_query("SELECT DISTINCT 
AccountCharacter.GameIDC, 
memb_stat.ServerName, memb_stat.ServerName, 
memb_stat.IP, memb_stat.ConnectTM, 
memb_stat.DisConnectTM 
from 
Memb_stat 
join 
AccountCharacter 
on 
Memb_stat.memb___id = AccountCharacter.ID 
collate Latin1_general_CI_AS 
where Memb_stat.connectstat = 1");
$qts=mssql_num_rows($sql);
if($qts<1){ 
echo "<div align=center><font size=2><strong>Nenhum player ON</div>";
}
else{
echo "
<table width=100% border=1 bordercolor=#2b2b2b align=center>
  <tr>
    <td bordercolor=white align=center><strong>Nome</td>
    <td bordercolor=white align=center><strong>Mapa</td>
    <td bordercolor=white align=center><strong>Lvl</td>
  </tr>
";
		while($row=mssql_fetch_array($sql)){
$name=$row['GameIDC'];
$sql2 = mssql_query("SELECT * FROM Character Where Name='$name'");
$row2=mssql_fetch_array($sql2);
if($row2['MapNumber'] == 0){ $row2['MapNumber'] =  'Lorencia'; } 
if($row2['MapNumber'] == 3){ $row2['MapNumber'] =  'Noria'; } 
if($row2['MapNumber'] == 2){ $row2['MapNumber'] =  'Davias'; } 
if($row2['MapNumber'] == 6){ $row2['MapNumber'] =  'Stadium'; } 
if($row2['MapNumber'] == 7){ $row2['MapNumber'] =  'Atlans'; } 
if($row2['MapNumber'] == 24){ $row2['MapNumber'] =  'Kalima'; } 
if($row2['MapNumber'] == 8){ $row2['MapNumber'] =  'Tarkan'; } 
if($row2['MapNumber'] == 1){ $row2['MapNumber'] =  'Dungeon'; } 
if($row2['MapNumber'] == 4){ $row2['MapNumber'] =  'Losttower'; } 
if($row2['MapNumber'] == 10){ $row2['MapNumber'] =  'Icarus'; } 
if($row2['MapNumber'] == 11){ $row2['MapNumber'] =  'BC I'; } 
if($row2['MapNumber'] == 12){ $row2['MapNumber'] =  'BC II'; } 
if($row2['MapNumber'] == 13){ $row2['MapNumber'] =  'BC III'; } 
if($row2['MapNumber'] == 14){ $row2['MapNumber'] =  'BC IIII'; } 
if($row2['MapNumber'] == 15){ $row2['MapNumber'] =  'BC IIIII'; } 
if($row2['MapNumber'] == 16){ $row2['MapNumber'] =  'BC IIIIII'; } 
if($row2['MapNumber'] == 9){ $row2['MapNumber'] =  'Devil Square'; } 
if($row2['reset'] == NULL){ $row2['reset'] = '0'; }
		echo "<tr>";
        echo "<td><font color=red>".$row['GameIDC']."</td>";
        echo "<td>".$row2['MapNumber']."</td>";
        echo "<td>".$row2['cLevel']."(".$row2['reset'].")</td>";
        echo "<td bordercolor=black align=center><a href=charinfo.php?char=".$row['GameIDC'].">Whois</a></td>
  </tr>
";
		}
}
		?>
</table>

    